# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-wsproto
_pkgname=wsproto
pkgver=0.15.0
pkgrel=1
pkgdesc='WebSockets state-machine based protocol implementation.'
url='https://github.com/python-hyper/wsproto'
arch=('any')
license=('MIT')
depends=('python2' 'python2-h11')
makedepends=('python2-setuptools')
source=("https://pypi.io/packages/source/w/wsproto/wsproto-$pkgver.tar.gz")
sha512sums=('c9666ec65374181da762f460f0c394a5bb599f8a0666989fb2d53e5e8822f5ebdd28eae3098e115d5bbacf6d6e1dd33a9cfeb808d569e1a01025eefaff18c531')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" -O1 --skip-build

  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

